<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>二次元登录界面</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Arial, sans-serif;
        }

        body {
            min-height: 100vh;
            background: url('./image/background.jpg') no-repeat center center fixed;
            background-size: cover;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        /* 背景遮罩 */
        body::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(1px);
            z-index: 0;
        }

        .login-box {
            background: rgba(255, 255, 255, 0.95);
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
            width: 400px;
            z-index: 1;
            position: relative;
            transform: translateY(20px);
            animation: float 3s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(20px); }
            50% { transform: translateY(-20px); }
        }

        .login-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .login-header h1 {
            color: #ff6b6b;
            font-size: 2em;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .input-group {
            margin-bottom: 25px;
            position: relative;
        }

        .input-group input {
            width: 100%;
            padding: 15px;
            border: 2px solid #ddd;
            border-radius: 10px;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        .input-group input:focus {
            outline: none;
            border-color: #ff6b6b;
            box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
        }

        .input-group label {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #999;
            pointer-events: none;
            transition: all 0.3s ease;
        }

        .input-group input:focus ~ label,
        .input-group input:valid ~ label {
            top: -10px;
            left: 5px;
            font-size: 12px;
            color: #ff6b6b;
            background: white;
            padding: 0 5px;
        }

        .login-btn {
            width: 100%;
            padding: 15px;
            background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
            border: none;
            border-radius: 10px;
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .login-btn:hover {
            transform: scale(1.05);
        }

        .links {
            margin-top: 20px;
            text-align: center;
        }

        .links a {
            color: #ff6b6b;
            text-decoration: none;
            font-size: 14px;
            margin: 0 10px;
        }

        /* 樱花飘落效果 */
        .sakura {
            position: absolute;
            z-index: 0;
            animation: fall linear infinite;
        }

        @keyframes fall {
            to {
                transform: translateY(100vh) rotate(360deg);
            }
        }
    </style>
</head>
<body>
    <!-- 樱花效果可以通过JavaScript添加 -->
    
    <div class="login-box">
        <div class="login-header">
            <h1>欢迎回来</h1>
        </div>
        <form action="./chat.html" method="GET" >
            <div class="input-group">
                <input type="text" name="username">
                <label>用户名</label>
            </div>
            <div class="input-group">
                <input type="password" name="password">
                <label>密码</label>
            </div>
            <button type="submit" class="login-btn">登录</button>
        </form>
        <div class="links">
            <a href="#">忘记密码？</a>
            <a href="#">注册账号</a>
        </div>
    </div>

    <script>
        alert('密码错误，请重新输入！');
        // 添加樱花动画
        function createSakura() {
            const sakura = document.createElement('div');
            sakura.classList.add('sakura');
            sakura.innerHTML = '🌸';
            sakura.style.left = Math.random() * 100 + 'vw';
            sakura.style.animationDuration = Math.random() * 3 + 2 + 's';
            sakura.style.opacity = Math.random();
            document.body.appendChild(sakura);

            setTimeout(() => {
                sakura.remove();
            }, 5000);
        }

        setInterval(createSakura, 300);
    </script>
</body>
</html>